import { request } from '@/utils/request'
import type { LoginWxFrom, LoginAccountForm } from '@/api/login/types'


const baseUrl = '/api/user'
/* 微信登录 */
export const loginWxApi = (data : LoginWxFrom) => {
	return request({
		url: baseUrl + '/login/wx',//TIDO 这个对应地址后台还没写
		method: 'POST',
		data
	})
}
/* 账号密码登录 */
export const loginAccountApi = (data : LoginAccountForm) => {
	return request({
		url: baseUrl + '/login',
		method: 'POST',
		data
	})
}


/* 退出登录 */
export const logoutApi = () => {
	return request({
		url: baseUrl + `/logout`,
		method: 'POST',
	})
}
